﻿using System.ComponentModel.DataAnnotations;

namespace DevelopmentKit.Web.Controllers.ViewModels.UserViewModels
{
    public class UserViewModel
    {
        /// <summary>
        /// 用户id
        /// </summary> 
        public virtual int Id { get; set; }
        /// <summary>
        /// 登录名  登录名唯一
        /// </summary>  
        [Display(Name = "登录名")]
        [Required(ErrorMessage = "{0}不能为空")]
        [StringLength(32, ErrorMessage = "{0}不能超过{1}个字符", MinimumLength = 0)]
        public virtual string UserName { get; set; }
        /// <summary>
        /// 姓名
        /// </summary>
        [Display(Name = "姓名")]
        [Required(ErrorMessage = "{0}不能为空")]
        [StringLength(32, ErrorMessage = "{0}不能超过{1}个字符", MinimumLength = 0)]
        public virtual string Name { get; set; }
        /// <summary>
        /// 手机号码
        /// </summary>
        [Display(Name = "手机号码")]
        [Required(ErrorMessage = "{0}不能为空")]
        [StringLength(32, ErrorMessage = "{0}不能超过{1}个字符", MinimumLength = 0)]
        public virtual string Mobile { get; set; }
        /// <summary>
        /// 邮箱
        /// </summary>
        [Display(Name = "邮箱")]
        [Required(ErrorMessage = "{0}不能为空")]
        [StringLength(32, ErrorMessage = "{0}不能超过{1}个字符", MinimumLength = 0)]
        public virtual string Email { get; set; }
        /// <summary>
        /// 用户角色
        /// </summary>
        [Display(Name = "用户角色")]
        [Required(ErrorMessage = "{0}不能为空")]
        public virtual string[] Roles { get; set; }
         
    }
}